package cn.iocoder.yudao.module.ao.dal.mysql.schedule;

// import java.util.*;

// import cn.iocoder.yudao.framework.common.pojo.PageResult;
// import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ao.dal.dataobject.schedule.ScheduleDO;
import org.apache.ibatis.annotations.Mapper;
// import cn.iocoder.yudao.module.ao.controller.admin.schedule.vo.*;

/**
 * 课程安排 Mapper
 *
 * @author 小y
 */
@Mapper
public interface ScheduleMapper extends BaseMapperX<ScheduleDO> {

    /* 
     * ============================================================
     * 以下方法已废弃 - 不适用于新的 jx_senior_vocational_class_schedule 表结构
     * 新表结构使用横向weekday字段(monday_course ~ sunday_course)
     * 不再使用 courseName, dayOfWeek, timeSlot, weekNumber 等字段
     * ============================================================
     */

    // default PageResult<ScheduleDO> selectPage(SchedulePageReqVO reqVO) {
    //     return selectPage(reqVO, new LambdaQueryWrapperX<ScheduleDO>()
    //             .likeIfPresent(ScheduleDO::getCourseName, reqVO.getCourseName())
    //             .likeIfPresent(ScheduleDO::getClassName, reqVO.getClassName())
    //             .eqIfPresent(ScheduleDO::getLocation, reqVO.getLocation())
    //             .eqIfPresent(ScheduleDO::getDayOfWeek, reqVO.getDayOfWeek())
    //             .eqIfPresent(ScheduleDO::getTimeSlot, reqVO.getTimeSlot())
    //             .eqIfPresent(ScheduleDO::getWeekNumber, reqVO.getWeekNumber())
    //             .eqIfPresent(ScheduleDO::getUserId, reqVO.getUserId())
    //             .likeIfPresent(ScheduleDO::getTeacherName, reqVO.getTeacherName())
    //             .eqIfPresent(ScheduleDO::getRemark, reqVO.getRemark())
    //             .betweenIfPresent(ScheduleDO::getCreateTime, reqVO.getCreateTime())
    //             .orderByDesc(ScheduleDO::getId));
    // }

    // /**
    //  * 查询指定地点和周次的课程列表
    //  */
    // default List<ScheduleDO> selectList(String location, Integer weekNumber) {
    //     return selectList(new LambdaQueryWrapperX<ScheduleDO>()
    //             .eqIfPresent(ScheduleDO::getLocation, location)
    //             .eqIfPresent(ScheduleDO::getWeekNumber, weekNumber)
    //             .orderByAsc(ScheduleDO::getDayOfWeek)
    //             .orderByAsc(ScheduleDO::getTimeSlot));
    // }

    // /**
    //  * 查询指定地点、周次和教师的课程列表
    //  */
    // default List<ScheduleDO> selectList(String location, Integer weekNumber, String teacherName) {
    //     return selectList(new LambdaQueryWrapperX<ScheduleDO>()
    //             .eqIfPresent(ScheduleDO::getLocation, location)
    //             .eqIfPresent(ScheduleDO::getWeekNumber, weekNumber)
    //             .eqIfPresent(ScheduleDO::getTeacherName, teacherName)
    //             .orderByAsc(ScheduleDO::getDayOfWeek)
    //             .orderByAsc(ScheduleDO::getTimeSlot));
    // }

    // /**
    //  * 查询指定地点、时间是否有课程(用于冲突检查)
    //  */
    // default ScheduleDO selectByLocationAndTime(String location, Integer dayOfWeek, 
    //                                             Integer timeSlot, Integer weekNumber) {
    //     return selectOne(new LambdaQueryWrapperX<ScheduleDO>()
    //             .eq(ScheduleDO::getLocation, location)
    //             .eq(ScheduleDO::getDayOfWeek, dayOfWeek)
    //             .eq(ScheduleDO::getTimeSlot, timeSlot)
    //             .eq(ScheduleDO::getWeekNumber, weekNumber));
    // }

    // /**
    //  * 查询指定地点、时间是否有课程(用于冲突检查，可排除指定ID)
    //  */
    // default ScheduleDO selectByLocationAndTime(String location, Integer dayOfWeek, 
    //                                             Integer timeSlot, Integer weekNumber, Long excludeId) {
    //     return selectOne(new LambdaQueryWrapperX<ScheduleDO>()
    //             .eq(ScheduleDO::getLocation, location)
    //             .eq(ScheduleDO::getDayOfWeek, dayOfWeek)
    //             .eq(ScheduleDO::getTimeSlot, timeSlot)
    //             .eq(ScheduleDO::getWeekNumber, weekNumber)
    //             .ne(excludeId != null, ScheduleDO::getId, excludeId));
    // }

}